/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javateknik.portal.model.entities;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;

/**
 *
 * @author hanssonke
 */
@Entity
@NamedQuery(name = "findAllMessages", query = "SELECT m FROM Message m")
public class Message implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    private String sender = new String();
    private String subject = new String();
    private String content = new String();
    private Boolean selected = new Boolean(false);

    public Message(String sender, String subject, String content) {
        setSender(sender);
        setSubject(subject);
        setContent(content);
    }

    public Message() {
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Boolean getSelected() {
        return selected;
    }

    public void setSelected(Boolean selected) {
        this.selected = selected;
    }
}
